<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

    <ui:define name="body">

        <h1>Welcome to Seam!</h1>
        <rich:panel rendered="#{not identity.loggedIn}"">
            <h:panelGrid columns="2">
			    <h:graphicImage value="/img/seamlogo.png" alt="Seam logo"/>
                <s:div styleClass="info">
                    <p><strong>Your seam-gen project is deployed!</strong> Here are some of the features this project provides:</p>
                    <ul class="bullets">
                        <li>Ant build script</li>
                        <li>Deployment to JBoss AS (EAR or WAR)</li>
                        <li>Development and production profiles</li>
                        <li>Integration testing using TestNG and Embedded JBoss</li>
                        <li>JavaBean or EJB 3.0 Seam components</li>
                        <li>JPA entity classes</li>
                        <li>A configurable DataSource and JPA EntityManager</li>
                        <li>Templated Facelets views</li>
                        <li>RichFaces panels and tables</li>
                        <li>Default CSS stylesheet</li>
                        <li>Internationalization support</li>
                    </ul>
                </s:div>
            </h:panelGrid>
        </rich:panel>
        <h:form>
        <h2>Maisons List</h2>
        <h:outputText value="Pas de Maisons a Afficher" 
                   rendered="#{maisonsList.rowCount==0}"/>
        <h:dataTable var="maison" value="#{maisonsList}" 
                  rendered="#{maisonsList.rowCount>0}">
            <h:column>
                <f:facet name="header">
                    <h:outputText value="Read"/>
                </f:facet>           
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="Descriptif"/>
                </f:facet>
                <h:commandLink value="#{maison.descriptif}" action="#{MaisonEJBLocalIF.select}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="Lieu"/>
                </f:facet>
                <h:outputText value="#{maison.lieu}">             
                </h:outputText>
            </h:column>
             <h:column>
                <f:facet name="header">
                    <h:outputText value="Image"/>
                </f:facet>
                <h:outputText value="#{maison.path}">             
                </h:outputText>
            </h:column>
            <h:column>
                <h:commandButton value="Delete" action="#{MaisonEJBLocalIF.delete}"/>
            </h:column>
        </h:dataTable>
        <h3><h:outputText value="#{maison.title}"/></h3>
        <div><h:outputText value="#{maison.text}"/></div>
   </h:form>
            
        

    </ui:define>
</ui:composition>
